package com.tianya.common.sercurity;

import com.tianya.common.util.Utility;

public class Md5Coder {

	/**
	 * MD5摘要
	 * @param pContent 摘要明文
	 * @return MD5摘要
	 */
	public static String sign(String pContent)
	{
		try 
		{
			//初始化MD5
			java.security.MessageDigest md5=java.security.MessageDigest.getInstance("MD5");
			
			return Utility.Bin2HexString(md5.digest(pContent.getBytes("gb2312")));
		}
		catch (Exception e) 
		{			
			return "";		
		}		
	}
}
